package coolapk.cj.cj.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author wenjunjun9
 * @created 2021-02-19 16:34
 * @description
 */
@Data
public class PersonDto implements Serializable {

    private Long id;

    /**
     * 参与者qq
     */
    @NotBlank(message = "参与者不能为空")
    private String qq;

    /**
     * 参与者ip
     */
    private String ip;

    /**
     * 参与抽奖的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 奖品的id
     */
    @NotEmpty(message = "奖品不能为空")
    private List<Long> goodsId;

    /**
     * 奖品的名称，为了方便所以直接加上了商品名称
     */
    private List<String> goodsName;
}
